--- id: TASK-003 title: Wrapped-line vertical move can skip a row at a trailing-space boundary status: "\U0001F3C1 Done" assignee: [] created_date: '2026-06-28 18:38' updated_date: '2026-06-29 01:18' labels: - bug dependencies: [] priority: low ordinal: 3000 --- ## Description MoveUp/MoveDown via applyGoal: when goalCol clamps to min(goalCol, target.runes) and the target is a non-last wrap segment ending in a trailing space (e.g. 'aaaa ' runes=5), landing at col=start+5 == start of the NEXT segment, so cursorVIndex maps to the row after the intended one — arrow visibly skips a row. No buffer/state corruption; logical position is sensible. Fix: clamp non-last segments to runes-1 at a soft-wrap boundary, or special-case the trailing-space column. Add a regression test pinning intended behavior. ## Acceptance Criteria - [ ] #1 vertical move lands on the visually-adjacent row at wrap boundaries - [ ] #2 regression test added